run: all a.out
	./a.out | tee run.log

test: all a.out
	valgrind ./a.out

all: main.o menu_manager.o scheduler.o print_buffer.o mfqueue.o mfbase.o generic_scheduler.o scheduler_mfqs.o scheduler_hws.o process.o
	g++ main.o menu_manager.o scheduler.o print_buffer.o mfqueue.o mfbase.o generic_scheduler.o scheduler_mfqs.o scheduler_hws.o process.o

main.o: main.cc
	g++ -Wall -c main.cc

menu_manager.o: menu_manager.cc menu_manager.h
	g++ -Wall -c menu_manager.cc

scheduler.o: scheduler.cc scheduler.h
	g++ -Wall -c scheduler.cc

mfqs_scheduler.o: mfqs_scheduler.cc mfqs_scheduler.h
	g++ -Wall -c mfqs_scheduler.cc

generic_scheduler.o: generic_scheduler.cc generic_scheduler.h
	g++ -Wall -c generic_scheduler.cc

scheduler_mfqs.o: scheduler_mfqs.cc scheduler_mfqs.h
	g++ -Wall -c scheduler_mfqs.cc

scheduler_hws.o: scheduler_hws.cc scheduler_hws.h
	g++ -Wall -c scheduler_hws.cc

process.o: process.cc process.h
	g++ -Wall -c process.cc

mfqueue.o: mfqueue.cc mfqueue.h
	g++ -Wall -c mfqueue.cc

mfbase.o: mfbase.cc mfbase.h
	g++ -Wall -c mfbase.cc

print_buffer.o: print_buffer.cc print_buffer.h
	g++ -Wall -c print_buffer.cc

rem_a_out:
	rm -f a.out

rem_gch:
	rm -f *.gch

clean:
	rm -f *.o *.log *.out *.gch

